package top.boycharse.factory.net;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import top.boycharse.factory.model.api.RspModel;
import top.boycharse.factory.model.api.account.AccountRspModel;
import top.boycharse.factory.model.api.account.LoginModel;
import top.boycharse.factory.model.api.account.RegisterModel;
import top.boycharse.factory.model.api.user.UserUpdateModel;
import top.boycharse.factory.model.card.UserCard;

public interface RemoteService {

    /**
     * 网络请求一个注册接口
     * @param model 传入的是RegisterModel
     * @return Call<RspModel<AccountRspModel>>
     */
    @POST("account/register")
    Call<RspModel<AccountRspModel>> accountRegister(@Body RegisterModel model);

    /**
     *
     * @param model
     * @return
     */
    @POST("account/login")
    Call<RspModel<AccountRspModel>> accountLogin(@Body LoginModel model);

    /**
     * 绑定设备id
     * @param pushId 设备Id
     * @return
     */
    @POST("account/bind/{pushId}")
    Call<RspModel<AccountRspModel>> accountBind(@Path(encoded = true,value = "pushId")String pushId);


    /**
     * 用户跟新的接口
     * @param model model
     * @return
     */
    @PUT("user")
    Call<RspModel<UserCard>> accountUpdate(@Body UserUpdateModel model);
}
